package com.open.basic.exception;

import java.io.Serial;

/**
 * @author: system
 * @Date: 2024/4/19 15:44
 * @Version: V1.0
 * @description: desc:通用业务异常类
 */

public class BizException extends GenericException {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * @param code    错误码
     * @param message 异常信息
     */
    public BizException(String code, String message) {
        super(message);
        this.code = code;
        this.msg = message;
    }

    public BizException(String message) {
        super(message);
        this.msg = message;
    }

    public BizException(Exception exception) {
        super(exception);
    }


    public BizException(Throwable throwable) {
        super(throwable);
    }

    public BizException(String message, Exception exception) {
        super(message, exception);
        this.msg = message;
    }

    public BizException(String message, Throwable throwable) {
        super(message, throwable);
        this.msg = message;
    }

    public BizException(String code, String message, Throwable throwable) {
        super(code, message, throwable);
        this.code = code;
        this.msg = message;
    }

}
